package com.ssy.lingxi.order.repository;

import com.ssy.lingxi.order.entity.MemberPaymentDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 平台后台 - 商户支付参数配置Jpa仓库
 * @author 万宁
 * @version 2.0.0
 * @date 2021-11-25
 */
@Repository
public interface MemberPaymentRepository extends JpaRepository<MemberPaymentDO, Long>, JpaSpecificationExecutor<MemberPaymentDO>, QuerydslPredicateExecutor<MemberPaymentDO> {
    MemberPaymentDO findFirstByMemberIdAndRoleId(Long memberId, Long roleId);

    List<MemberPaymentDO> findByMemberIdAndRoleId(Long memberId, Long roleId);
}
